import 'package:dio/dio.dart';

class ReqInterceptor extends InterceptorsWrapper {
  @override
  void onRequest(RequestOptions options, RequestInterceptorHandler handler) {
    var header = options.headers;
    // header 处理
    handler.next(options);
  }
  @override
  void onResponse(Response response, ResponseInterceptorHandler handler) {
    // RequestOptions option = response.requestOptions;
    var status = response.statusCode;
    // 特殊code处理
    if (status == 400) {
      // 
    }
    handler.next(response);
  }
}